﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<t_205_verk_hopur_12.Models.ChannelApplicationViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Umsóknir
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% if (Model.Applications.ElementAtOrDefault(0) == null)
   { %>
    <h2>Engar umsóknir</h2>
    <%}
   else
   { %>
    <h2>Umsóknir</h2>

    <table class="NeatTable">
        <tr>
            <th></th>
            <th>
                Nafn umsækjanda
            </th>
        </tr>

    <% foreach (var item in Model.Applications)
       { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Ráða", "HireEmployee",  new { id = Model.Channel.ID, userID = item.ID })%> |
                <%= Html.ActionLink("Hafna", "RemoveApplication", new { id = Model.Channel.ID, userID = item.ID })%>
            </td>
            <td>
                <%= Html.Encode(item.Username)%>
            </td>
        </tr>
    
    <% } %>

    </table>
    <% } %>
    <p>
        <%= Html.ActionLink("Til baka", "Admin", new { id = Model.Channel.ID })%>
    </p>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LogoText" runat="server">
    <%= Html.ActionLink(Model.Channel.Name, "Index", new { id = Model.Channel.ID }) %>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="MenuBar" runat="server">
    <% Html.RenderPartial("AdminChannelMenuBar", Model.Channel); %>
</asp:Content>


